#ifndef MYCANVAS_H
#define MYCANVAS_H
#include <QWidget>
#include <QPainter>
#include <vector.h>
#include <rungekutta.h>
#include <QMouseEvent>
class MyCanvas : public QWidget
{
    Q_OBJECT
public:
    explicit MyCanvas(QWidget *parent = 0);
    ~MyCanvas();
    virtual void paintEvent(QPaintEvent* pEvent);
    virtual void mousePressEvent(QMouseEvent* event);
    double cambiarSistemaCoordenadas(double coordenada, double cotainferiorvieja, double cotasuperiorvieja, double cotainferiornueva, double cotasuperiornueva);
    int x_canvas(double x_funcion, QSize* size);
    int y_canvas(double y_funcion, QSize* size);
    double x_funcion(int x_canvas, QSize* size);
    double y_funcion(int y_canvas, QSize* size);
    double x_cotainferior;
    double x_cotasuperior;
    double y_cotainferior;
    double y_cotasuperior;
    virtual void pintarFuncion();
    RungeKutta* funcion;
    bool pinto;
signals:

public slots:


};

#endif // MYCANVAS_H
